package com.doublefish.doublefishrobot.ui.setting;

import android.content.Intent;
import android.net.Uri;
import android.widget.TextView;

import com.doublefish.doublefishrobot.R;
import com.doublefish.doublefishrobot.base.BaseActivity;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 作者:dugaofeng on 2024/10/16 08:51
 */

public class ContactUsActivity extends BaseActivity {

    @BindView(R.id.tv_title)
    TextView titleTv;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_contact;
    }

    @Override
    protected void initView() {
        titleTv.setText(R.string.contact_us);
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initListener() {

    }

    @OnClick(R.id.ll_back)
    public void onBackBtnClick() {
        finish();
    }

    @OnClick(R.id.tv_email)
    public void onEmailBtnClick() {
        String[] email = {"sales@doublefish.com"};
        Uri uri = Uri.parse("mailto:sales@doublefish.com");

        Intent intent = new Intent(Intent.ACTION_SENDTO, uri);
        intent.putExtra(Intent.EXTRA_CC, email);
        startActivity(Intent.createChooser(intent, getString(R.string.email)));
    }

    @OnClick(R.id.tv_web)
    public void onWebBtnClick() {
        String url = "https://www.doublefish.com";

        Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setData(Uri.parse(url));
        startActivity(intent);

    }

    @OnClick(R.id.image)
    public void onWxoaClick() {
        String url = "http://weixin.qq.com/r/mp/ckNqckPEiB73rQcR9xZg";

        Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setData(Uri.parse(url));
        startActivity(intent);
    }
}
